(function(){ var root=(typeof exports==='undefined' ? window:exports); var config={ retinaImageSuffix:'@2x', check_mime_type: true, force_original_dimensions: true }; function Retina(){} root.Retina=Retina; Retina.configure=function(options){ if(options===null){ options={};} for (var prop in options){ if(options.hasOwnProperty(prop)){ config[prop]=options[prop]; }} }; Retina.init=function(context){ if(context===null){ context=root; } var existing_onload=context.onload||function(){}; context.onload=function(){ var images=document.getElementsByTagName('img'), retinaImages=[], i, image; for (i=0; i < images.length; i +=1){ image=images[i]; if(!!!image.getAttributeNode('data-no-retina')){ retinaImages.push(new RetinaImage(image)); }} existing_onload(); };}; Retina.isRetina=function(){ var mediaQuery='(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)'; if(root.devicePixelRatio > 1){ return true; } if(root.matchMedia&&root.matchMedia(mediaQuery).matches){ return true; } return false; }; var regexMatch=/\.\w+$/; function suffixReplace (match){ return config.retinaImageSuffix + match; } function RetinaImagePath(path, at_2x_path){ this.path=path||''; if(typeof at_2x_path!=='undefined'&&at_2x_path!==null){ this.at_2x_path=at_2x_path; this.perform_check=false; }else{ if(undefined!==document.createElement){ var locationObject=document.createElement('a'); locationObject.href=this.path; locationObject.pathname=locationObject.pathname.replace(regexMatch, suffixReplace); this.at_2x_path=locationObject.href; }else{ var parts=this.path.split('?'); parts[0]=parts[0].replace(regexMatch, suffixReplace); this.at_2x_path=parts.join('?'); } this.perform_check=true; }} root.RetinaImagePath=RetinaImagePath; RetinaImagePath.confirmed_paths=[]; RetinaImagePath.prototype.is_external=function(){ return !!(this.path.match(/^https?\:/i)&&!this.path.match('//' + document.domain)); }; RetinaImagePath.prototype.check_2x_variant=function(callback){ var http, that=this; if(this.is_external()){ return callback(false); }else if(!this.perform_check&&typeof this.at_2x_path!=='undefined'&&this.at_2x_path!==null){ return callback(true); }else if(this.at_2x_path in RetinaImagePath.confirmed_paths){ return callback(true); }else{ http=new XMLHttpRequest(); http.open('HEAD', this.at_2x_path); http.onreadystatechange=function(){ if(http.readyState!==4){ return callback(false); } if(http.status >=200&&http.status <=399){ if(config.check_mime_type){ var type=http.getResponseHeader('Content-Type'); if(type===null||!type.match(/^image/i)){ return callback(false); }} RetinaImagePath.confirmed_paths.push(that.at_2x_path); return callback(true); }else{ return callback(false); }}; http.send(); }}; function RetinaImage(el){ this.el=el; this.path=new RetinaImagePath(this.el.getAttribute('src'), this.el.getAttribute('data-at2x')); var that=this; this.path.check_2x_variant(function(hasVariant){ if(hasVariant){ that.swap(); }}); } root.RetinaImage=RetinaImage; RetinaImage.prototype.swap=function(path){ if(typeof path==='undefined'){ path=this.path.at_2x_path; } var that=this; function load(){ if(! that.el.complete){ setTimeout(load, 5); }else{ if(config.force_original_dimensions){ that.el.setAttribute('width', that.el.offsetWidth); that.el.setAttribute('height', that.el.offsetHeight); } that.el.setAttribute('src', path); }} load(); }; if(Retina.isRetina()){ Retina.init(root); }})(); (function($){ var defaults={ topSpacing: 0, bottomSpacing: 0, className: 'is-sticky', wrapperClassName: 'sticky-wrapper', center: false, getWidthFrom: '' }, $window=$(window), $document=$(document), sticked=[], windowHeight=$window.height(), scroller=function(){ var scrollTop=$window.scrollTop(), documentHeight=$document.height(), dwh=documentHeight - windowHeight, extra=(scrollTop > dwh) ? dwh - scrollTop:0; for (var i=0; i < sticked.length; i++){ var s=sticked[i], elementTop=s.stickyWrapper.offset().top, etse=elementTop - s.topSpacing - extra; if(scrollTop <=etse){ if(s.currentTop!==null){ s.stickyElement .css('position', '') .css('top', ''); s.stickyElement.parent().removeClass(s.className); s.currentTop=null; }}else{ var newTop=documentHeight - s.stickyElement.outerHeight() - s.topSpacing - s.bottomSpacing - scrollTop - extra; if(newTop < 0){ newTop=newTop + s.topSpacing; }else{ newTop=s.topSpacing; } if(s.currentTop!=newTop){ s.stickyElement .css('position', 'fixed') .css('top', newTop); if(typeof s.getWidthFrom!=='undefined'){ s.stickyElement.css('width', $(s.getWidthFrom).width()); } s.stickyElement.parent().addClass(s.className); s.currentTop=newTop; }} }}, resizer=function(){ windowHeight=$window.height(); }, methods={ init: function(options){ var o=$.extend(defaults, options); return this.each(function(){ var stickyElement=$(this); var stickyId=stickyElement.attr('id'); var wrapper=$('
') .attr('id', stickyId + '-sticky-wrapper') .addClass(o.wrapperClassName); stickyElement.wrapAll(wrapper); if(o.center){ stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"}); } if(stickyElement.css("float")=="right"){ stickyElement.css({"float":"none"}).parent().css({"float":"right"}); } var stickyWrapper=stickyElement.parent(); stickyWrapper.css('height', stickyElement.outerHeight()); sticked.push({ topSpacing: o.topSpacing, bottomSpacing: o.bottomSpacing, stickyElement: stickyElement, currentTop: null, stickyWrapper: stickyWrapper, className: o.className, getWidthFrom: o.getWidthFrom }); }); }, update: scroller }; if(window.addEventListener){ window.addEventListener('scroll', scroller, false); window.addEventListener('resize', resizer, false); }else if(window.attachEvent){ window.attachEvent('onscroll', scroller); window.attachEvent('onresize', resizer); } $.fn.sticky=function(method){ if(methods[method]){ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); }else if(typeof method==='object'||!method){ return methods.init.apply(this, arguments); }else{ $.error('Method ' + method + ' does not exist on jQuery.sticky'); }}; $(function(){ setTimeout(scroller, 0); }); })(jQuery); (function (a){ var b=a.event, c; b.special .smartresize={ setup: function (){ a(this).bind("resize", b.special .smartresize .handler) }, teardown: function (){ a(this).unbind("resize", b.special .smartresize .handler) }, handler: function (a, b){ var d=this, e=arguments; a.type="smartresize"; c&&clearTimeout(c); c=setTimeout(function (){ jQuery.event .handle .apply(d, e) }, "execAsap"===b ? 0:100) }}; a.fn .smartresize=function (a){ return a ? this.bind("smartresize", a):this .trigger("smartresize", ["execAsap"]) }})(jQuery); (function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;this.attr("novalidate","novalidate");b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){a=this.find("input, button");a.filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&a.filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("").attr("name", b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form(); else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name]; return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a, b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error", validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)}, onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults, a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."), minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator"),g="on"+e.type.replace(/^validate/, "");f.settings[g]&&f.settings[g].call(f,this[0],e)}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d= this.settings.rules;c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",a).validateDelegate("[type='radio'], [type='checkbox'], select, option","click", a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement= a=this.validationTargetFor(this.clean(a));this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors? this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&& a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)}, prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.validationTargetFor(this.clean(a));var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+ a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;aThe requested content cannot be loaded.
Please try again later.
The requested content cannot be loaded.
'+I+"
'+I+' |